-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Mailer] Update mailer.rst #13996
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Mailer] Update mailer.rst #13996
Conversation
I like most of these additions ... but I'm not sure about the array one. You cannot pass an array to these methods; that's why the example uses |
Well, how would you call it? "pass a splat-operator-splatted array"? ;-) Sure we could expand on this aspect more. What about:
But in the end, the code sample shows how to do it :-) |
We could rename this:
As this:
|
Well, the very reason for this PR is to get the word "array" onto the page ;-) |
Well, this update is wrong. you cannot pass an array to these methods. If you want to pass multiple addresses, you must pass them as separate arguments. You can use the spread operator of PHP ( |
I changed it to a comment in the code sample. If you don't like that either ;-) we could rename the variable in the code sample from |
9bde1c9
to
b51618f
Compare
Thomas, we finally merged this! Thanks for your contribution! We kept the first change ... but we removed the comment ("use the splat operator if you have an array"). The code example is literally showing the splat operator in action, so we don't think it's necessary to mention it explicitly in the comment. Thanks! |
Looks like this is not online yet at https://symfony.com/doc/4.4/mailer.html#email-addresses |
See symfony#13996 (comment) - I opened that other PR to get the word **array** on the page ;-) Also, I'm deleting two comments `// ...` from code blocks, since they're present in some, and absent in some. I think it's better to omit them, if the given example is (sort of) complete in itself. IMO, these 2 deleted comments did't add any value, and just made the page longer.
Adding the word "array" cause I searched for it, and since I didn't find it, opened this (bogus) issue: symfony/symfony#37657
Also added
addCc()
explicitly, since I also searched for this ;-)